Locking character and fixing bugs