small optimzation (found by Greg King)