Adjust ApplicationMain fix