i hollowed out my beam so i could put a 2x4 on first then attached the beam after i slid it over my 2x4. kind of a pain but eventually it worked out.
Hollowed it out? Like with a million circular saw cuts? Then did you run a screw through the top of the shelf into the 2x4?