PR from GCI staging_done branch

Had to do some conflict resolution as well. :|
@nursix that variable is also been used later. Maybe we would need it ?