fixed some minor bugs..