Fixed issue with .remove() not working correctly.