bugfix with > and <= confusion