Fix for some bugs part of assignment