Updated firmware version check code