Fixed a bug thanks to @Soleil