Added more changes to support SP