fixed bug in filter and added the cancel button