fixed a typesystem issue introduced by Markus recently while fixing the range expression type