Added check in row removal