bug fixes and work on deployment