More bug fixes

Still not done