Made things volatile, fixed compile error.