fixed some chores bugs