Fixed a bug in previous commit (still commented out)