Fixed bug in clear