fixes for inverted values