fixed some bug and added settings view