Modified for work with minetest 0.4.9