Update get phases api

1. Update current phase logic in get phases api
Merge pull request #271 from Ghost141/get_phases_update

Update get phases api