Fixed bug with automatic fix function