You're right. I need to go through this code again and fix silly mistakes like this.