some bug fixes and styling improvements