Changed releaseState to private and added a synchronized method to get its value. This will prevent releaseState from being written to in unwanted ways. It should be safer as a result.