negative size bug fix