fix compiling err
tick in seconds
fix invalid mem pointer bug