Fixed create function
Fixed unused variable