Fixed non cross-platform compatible code