Bug fixes in firebat