added edge case fix