maybe not a bug, but shouldn't it simply be == instead of <=?