Fixed and improved fw upgrade