Addressed review comment: Look out for ProgrammingError