some bug fixes and ui improvements