Slightly modified to check for push.