fixed http://piggydb.lighthouseapp.com/projects/61149-piggydb/tickets/42