Added compatibility for android and windows