Fixed bug with empty hash