Updated Core to catch ValueError