fix bug with double