fixing huge bugs