I'm sorry, but it really looks like some of the pictures that barrier is NOT close enough the mattress. It looks like a small child can get their body out under and their head get caught. There's been a lot of children killed with improper spacing on beds and railings meant to keep them safe. According to this
there should be less than 6" between the top of mattress and bottom of rail. (Gaurd Rail paragraph (6) and Figure 2.
Some of the things in that document don't apply because of the nature of the bed. There's some good safety information there.