Fix database events tests: ArgumentError: argument out of range