fixed some more BUGS