Update: I've implemented deducting the fee from "on hold" balance if a user has one, as suggested above.
I just logged in into my account and saw that my "on hold"-balance shows up 12.995 BTC instead 13 BTC? Why is there a difference of 0.005 BTC in fact of these 13 BTC where part of an offer but had not been sold at point of closing market. Nevermind that small value about 0.005 BTC but wanted to know why?