Fixed a bug in my previous bugfix