Pull request for Issue665

@dretrex 
@davidChevrier 
Missing AMErrorMon and doesn't call ```selectQuery.finish();```