race condition not being handled properly

getting the character schema and defining the character structure
competes with getting a character