fixed some slight bugs