Bug fixes for deep attention