fixed some bugss