bug fixes, small changes