updating bugfixed post thanks to @eml