fixed bug in onclik