Removed extra {} in erosion and dilation functions