fixed error in finish activity