bug fixes in code;