solved half a bug