Solved small bug in database table gateway