Issue 463: Updated by following Sergiu's comments.