Fixed: Forgot to call query.exec() at several places.