Additional safeguard added for invalid entry