Added assert in GUI and controller