Fixed Logical Errors on lines 19-21 & 80

Fixed Logical Errors on lines 19-21 & 80 (See Comments for details)