fixed bug with check values