some controller fix and various changes