Removed unused variable
Fixed error handling while adding applets