Fix of Builder UI update when opening a wrong project

* Added check of correct project opening
* Cleaned code