Library will not stay docked

Check this post on some tips for docking: