finally fixed bound issues