Moved block in to if-statement: