Fixed bug in scan handling in front end server: if