fixed alignment issues and bugs