Fixed erasing bug