bug fixes
more bugs fixes