Bug fix

Replaced incorrect function calls that appears when running in chrome,
on Windows, served with XAMPP.