Fixed bug in querying of sampling event entity