Can you post that script? At a first glance, the profit limit also looks ok to me, so maybe there's some other reason of the error message.