Added if-statement to the collision of blocks