Fixed some functionality and UI issues