library bugs fixed