fixed issue of extra space between cursor and margin