fixed bug with bounds