added debug config
fixing rendering logic