bug fixes

alot of fixes on the UI and java logic