Changed If block conditional clause to allow for more flexibility.