Added exception handling and meta key handling.