fix bug in border size
cleanning code