Added some safety checks for fetching.