Corrected cross-platform bug fix