Corporations have more rights then people. If you work on a project for one second on company time, even if you've spent thousands of hours on that project, the corporation now "owns" it.
It's embarrassing that I learned this fact from the TV show Silicon Valley and then it was reinforced when I actually read all that paperwork that you sign when you get a new job.