Fixed bug in empty function.