bug fixes for deployment