fixed frontend bugs
include flat UI rpoperly