Fixed bug with empty functions not being stripped out