fix for inverted