fixed missing sprite function and text offset