Fix undefined variable issues.
Adding direct post module