fixed bug with calculating availibility for reservation