Fix/#50 volatile

Resubmitting the pull request with added comment.