Amended if-statement