fixing issue with ace logic