Test and fix constant parsing