Fixing a bug http://atutor.ca/atutor/mantis/view.php?id=5136