minor bug fixes, final commit