Bug fixes and align extend classes