Fixed some slight bugs