some adjustments and constraint bug fix