Small fixes

- Safety checking for values in ETPOS and ATMs
- MySQL statement issue