More corner cases handling