proper handling of negative constants, but heisenbug