Correcting wrong function call for remove layer