Fixed errors with resize sensor