Minor api error handling and layout fix