Bugfix for 836

review here 
http://mrccodereview.cloudapp.net/ui#review:id=1318