Fix potential nil pointer deref
Add test data
Add test cur pos
Add test output
Add description for test.0047