final bug fixes for submission