Works properly now